home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
027a
/
man501.zip
/
MAN501.TXT
Wrap
Text File
|
1990-10-12
|
8KB
|
301 lines
BREAK() Branch out of a BEGIN SEQUENCE...END construct
BREAK()
Branch out of a BEGIN SEQUENCE...END construct
Syntax
BREAK(<exp>) --> NIL
Arguments
<exp>is the value passed to the RECOVER clause, if any. Note that
<exp> is not optional. NIL may be specified if there is no break
value.
Returns
BREAK() always returns NIL.
Description
The BREAK() function is identical in functionality to the BREAK
statement. The function must be executed during a SEQUENCE.
Examples
The following example illustrates how to break out of a SEQUENCE from a
code block:
bSave := ERRORBLOCK( {|x| BREAK(x)} )
BEGIN SEQUENCE
.
.
.
RECOVER USING objError
.
.
.
END
ERRORBLOCK(bSave)
Files: Library is CLIPPER.LIB.
seealso: c5g0_003.ngo:"BEGIN SEQUENCE"
DEVOUT() Write a value to the current device
DEVOUT()
Write a value to the current device
Syntax
DEVOUT(<exp>) --> NIL
Arguments
<exp>is the value to display.
Returns
DEVOUT() always returns NIL.
Description
DEVOUT() is a full-screen display function that writes the value of a
single expression to the current device at the current cursor or
printhead position. DEVOUT() is used in combination with DEVPOS() in
STD.CH to implement the @...SAY command.
Examples
The following example shows the relationship between the DEVOUT()
function and the @...SAY command:
DEVPOS(10, 10)
DEVOUT("Hello there")
//
@ 10, 10 SAY "Hello there"
Files: Library is CLIPPER.LIB.
seealso: "COL()" "DEVPOS()" "OUTERR()" "OUTSTD()" "QOUT()" "ROW()" "SETPOS()"
GETACTIVE() Return the currently active Get object
GETACTIVE()
Return the currently active Get object
Syntax
GETACTIVE() --> objGet
Returns
GETACTIVE() returns the current active Get object within the current
READ. If there is no READ active when GETACTIVE() is called, it
returns NIL.
Description
GETACTIVE() is an environment function that provides access to the
active GET object during a READ. The current active Get object is the
one with input focus at the time GETACTIVE() is called.
Examples
The code that follows uses a WHEN clause to force control to branch to
a special reader function. Within this function, GETACTIVE() is used
to retrieve the active Get object:
@ 10, 10 GET x
@ 11, 10 GET y WHEN MyReader()
@ 12, 10 GET z
READ
// Called just before second get (above) becomes current
FUNCTION MyReader
LOCAL objGet // Active Get holder
objGet := GETACTIVE() // Retrieve current active Get
BarCodeRead( objGet )
RETURN (.F.) // Causes Get to be skipped in regular READ
Files: Library is CLIPPER.LIB, source code is in Getsys.prg.
seealso: "READMODAL()" c5g0_001.ngo:"@...GET" c5g0_001.ngo:"READ"
OUTERR() Write a list of values to the standard error device
OUTERR()
Write a list of values to the standard error device
Syntax
OUTERR(<exp list>) --> NIL
Arguments
<exp list>is a list of values to display and can consist of any
combination of data types including memo.
Returns
OUTERR() always returns NIL.
Description
OUTERR() is identical to OUTSTD() with the exception that it writes to
the standard error rather than the standard output device. Output sent
to the standard error device bypasses the Clipper console and output
devices as well as any DOS redirection. It is typically used to log
error messages in a manner that will not interfere with the standard
screen or printer output.
Examples
The following example displays an error message along with the date and
time of occurrence to the screen:
OUTERR("File lock failure", DATE(), TIME())
Files: Library is CLIPPER.LIB.
seealso: "DISPOUT()" "OUTSTD()"
OUTSTD() Write a list of values to the standard output device
OUTSTD()
Write a list of values to the standard output device
Syntax
OUTSTD(<exp list>) --> NIL
Arguments
<exp list>is a list of values to display and can consist of any
combination of data types including memo.
Returns
OUTSTD() always returns NIL.
Description
OUTSTD() is a simple output function. The function is similar to
QOUT(), except that it writes to the STDOUT device (instead of to the
Clipper console output stream). Programs with very simple output
requirements (e.g., that perform no full-screen input or output) can
use this function to avoid loading the terminal output subsystems. The
header file Simplio.ch redefines the ? and ?? commands to use the
OUTSTD() function.
Since OUTSTD() sends its output to the standard output device, the
output can be redirected using the DOS redirection symbols (>, >, |).
This allows you redirect output from a Clipper program to a file or
pipe. Refer to your PC/MS-DOS documentation for more information on
this operating system facility.
Examples
The following example uses OUTSTD() to display a list of
expressions:
OUTSTD(Name, PADR(RTRIM(City) + "," + State, 20), ZipCode)
This example shows how redirect the output of a Clipper
program to a new file using the DOS redirection operator (>):
C>MYPROG > FILE.TXT
Files: Library is CLIPPER.LIB, header file is Simplio.ch.
seealso: "DISPOUT()" "OUTERR()" "QOUT()"
SETBLINK() Toggle asterisk (*) interpretation in SETCOLOR()
SETBLINK()
Toggle asterisk (*) interpretation in SETCOLOR() string between
blinking and background intensity
Syntax
SETBLINK([<lToggle>]) --> lCurrentSetting
Arguments
<lToggle>toggles the meaning of the asterisk (*) character when it is
encountered in a SETCOLOR() string. Specifying true (.T.) causes the
asterisk to mean blinking and false (.F.) causes it to mean background
intensity. The default is true (.T.).
Returns
SETBLINK() returns the current setting as a logical value.
Description
SETBLINK() is an environment function that toggles the
blinking/background intensity attribute and reports the current state
of SETBLINK(). When SETBLINK() is on, characters written to the screen
can be made to blink by including an asterisk (*) in a color string
passed to SETCOLOR(). When SETBLINK() is off, the asterisk (*) causes
the background color to be intensified instead. Thus, blinking and
background intensity attributes are not available at the same time.
Note
This function is meaningful only on the IBM-PC or compatible computers
with CGA, EGA, or VGA display hardware.
Examples
This example saves the current SETBLINK() state before passing control
to a user-defined function. Upon return, SETBLINK() is restored to its
original value:
lOldBlink := SETBLINK()
MyFunc()
SETBLINK(lOldBlink)
Files: Library is CLIPPER.LIB.
seealso: "SETCOLOR()"
SETMODE() Change display mode to specified number of rows, columns
SETMODE()
Change display mode to specified number of rows and columns
Syntax
SETMODE(<nRows>, <nCols>) --> lSuccess
Arguments
<nRows>is the number of rows in the desired display mode.
<nCols>is the number of columns in the desired display mode.
Returns
SETMODE() returns true (.T.) if the mode change was successful;
otherwise, it returns false (.F.).
Description
SETMODE() is an environment function that attempts to change the mode
of the display hardware to match the number of rows and columns
specified. The change in screen size is reflected in the values
returned by MAXROW() and MAXCOL().
Examples
The following example switches to a 43-line display mode:
IF SETMODE(43, 80)
? "43-line mode successfully set"
ELSE
? "43-line mode not available"
ENDIF
Files: Library is CLIPPER.LIB.
seealso: "MAXCOL()" "MAXROW()"